
/**
 * Please modify this class to meet your needs
 * This class is not complete
 */

package com.cctv.cdm._interface.cdmfinalbclistservice._0_1;

import java.math.BigInteger;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.logging.Logger;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;

import org.eclipse.jetty.util.log.Log;

import com.cctv.ppm.schema.esb_commondatatypes._0.SubscriberType;
import com.cctv.ppm.schema.ppm_commondatatypes._0.AdProgBcastSchType;
import com.cctv.ppm.schema.ppm_commondatatypes._0.BroadcastListItemType;
import com.cctv.ppm.schema.ppm_commondatatypes._0.BroadcastListItemsType;
import com.cctv.ppm.schema.ppm_commondatatypes._0.ExtendAttributeType;
import com.cctv.ppm.schema.ppm_commondatatypes._0.LanguageType;
import com.cctv.ppm.schema.ppm_commondatatypes._0.PlayDevInfoType;
import com.cctv.ppm.schema.ppm_commondatatypes._0.PlayListType;
import com.cctv.ppm.schema.ppm_commondatatypes._0.ProgSectionType;
import com.cctv.ppm.schema.ppm_commondatatypes._0.ProgSectionsType;
import com.cctv.ppm.schema.ppm_commondatatypes._0.ProgramKeyType;
import com.cctv.ppm.schema.ppm_commondatatypes._0.SubADItemsType;
import com.ctvit.framework.web.context.ContextHolder;
import com.ctvit.wsservice.basedata.domain.ZcdmTAdSch;
import com.ctvit.wsservice.basedata.domain.ZcdmTDev;
import com.ctvit.wsservice.basedata.domain.ZcdmTFinalitemWithBLOBs;
import com.ctvit.wsservice.basedata.domain.ZcdmTFinallist;
import com.ctvit.wsservice.basedata.domain.ZcdmTFinalseg;
import com.ctvit.wsservice.basedata.domain.ZcdmTInnerad;
import com.ctvit.wsservice.basedata.service.FinalBCListService;


/**
 * This class was generated by Apache CXF 2.5.0
 * 2022-01-11T10:25:41.165+08:00
 * Generated source version: 2.5.0
 *
 */

@javax.jws.WebService(
                      serviceName = "CDMFinalBroadcastListRequestService",
                      portName = "CDMFinalBroadcastListRequestHttpPort",
                      targetNamespace = "http://cctv.com/CDM/service/CDMFinalBroadcastListReceive/1.0",
                      wsdlLocation = "file:/opt/apache-tomcat-7.0.109/END04/DAP_CDMFinalBroadcastListService.wsdl",
                      endpointInterface = "com.cctv.cdm._interface.cdmfinalbclistservice._0_1.CDMFinalBroadcastListReceive")

public class CDMFinalBroadcastListReceiveImpl implements CDMFinalBroadcastListReceive {

    private static final Logger LOG = Logger.getLogger(CDMFinalBroadcastListReceiveImpl.class.getName());
	private com.cctv.cdm.schema.cdmfinalbclisttype._0.CDMFinalBroadcastListResponseInfoType _return;

    /* (non-Javadoc)
     * @see com.cctv.cdm._interface.cdmfinalbclistservice._0_1.CDMFinalBroadcastListReceive#getServiceInfo(com.cctv.esb.schema.monitor._0.GetServiceInfoRequestType  getServiceInfoRequest )*
     */
    public com.cctv.esb.schema.monitor._0.GetServiceInfoResponseType getServiceInfo(com.cctv.esb.schema.monitor._0.GetServiceInfoRequestType getServiceInfoRequest) throws ESBFault    {
        LOG.info("Executing operation getServiceInfo");
        System.out.println(getServiceInfoRequest);
        try {
            com.cctv.esb.schema.monitor._0.GetServiceInfoResponseType _return = null;
            return _return;
        } catch (java.lang.Exception ex) {
            ex.printStackTrace();
            throw new RuntimeException(ex);
        }
        //throw new ESBFault("ESBFault...");
    }

    /* (non-Javadoc)
     * @see com.cctv.cdm._interface.cdmfinalbclistservice._0_1.CDMFinalBroadcastListReceive#receiveCDMFinalBroadcastList(com.cctv.esb.schema.messagehead._0.RequestHeadType  requestHead ,)com.cctv.ppm.schema.ppm_commondatatypes._0.BA1FinalBroadcastListType  cdmFinalBroadcastListRequest )*
     */
    public com.cctv.cdm.schema.cdmfinalbclisttype._0.CDMFinalBroadcastListResponseInfoType receiveCDMFinalBroadcastList(com.cctv.esb.schema.messagehead._0.RequestHeadType requestHead,com.cctv.ppm.schema.ppm_commondatatypes._0.BA1FinalBroadcastListType cdmFinalBroadcastListRequest) throws ESBFault    {
        LOG.info("Executing operation receiveCDMFinalBroadcastList");
        System.out.println(requestHead);
        System.out.println(cdmFinalBroadcastListRequest);
        _return = new com.cctv.cdm.schema.cdmfinalbclisttype._0.CDMFinalBroadcastListResponseInfoType();
        try {

            FinalBCListService finalBCListService=ContextHolder.getBean(FinalBCListService.class);

            String broadcastListID = cdmFinalBroadcastListRequest.getBroadcastListID();
            XMLGregorianCalendar playDate = cdmFinalBroadcastListRequest.getPlayDate();
            String channelCode= cdmFinalBroadcastListRequest.getChannelCode();
            String channelName= cdmFinalBroadcastListRequest.getChannelName();
//            PlayListType playListType= cdmFinalBroadcastListRequest.getPlayListType();
//            BigInteger playlistVersion= cdmFinalBroadcastListRequest.getPlaylistVersion();
//            String playlistLockStatus= cdmFinalBroadcastListRequest.getPlaylistLockStatus();
//            XMLGregorianCalendar lastModificationTimestamp= cdmFinalBroadcastListRequest.getLastModificationTimestamp();
//            String lastModificationUserID= cdmFinalBroadcastListRequest.getLastModificationUserID();
            String zPlayDate = finalBCListService.getPlayDate(playDate.toGregorianCalendar().getTime(), new SimpleDateFormat("yyyy-MM-dd"));
//            Date zlastModifyDate = finalBCListService.getPlayDate(lastModificationTimestamp, new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
            ZcdmTFinallist zcdmTFinallist = new ZcdmTFinallist();
//            zcdmTFinallist.setzAftPlayId(zAftPlayId);
            zcdmTFinallist.setzProRecCd(broadcastListID);
            zcdmTFinallist.setzPlayDate(zPlayDate);
            zcdmTFinallist.setzChanlCd(channelCode);
//            zcdmTFinallist.setzReceiveDate(new Date());
//            zcdmTFinallist.setzIsUse(zIsUse);
//            zcdmTFinallist.setzCrusr("END04");
//            zcdmTFinallist.setzUseDate(zUseDate);
//            zcdmTFinallist.setzSrcSystem(zSrcSystem);
//            zcdmTFinallist.setzParentItemCd(zParentItemCd);

            BroadcastListItemsType broadcastListItems = cdmFinalBroadcastListRequest.getBroadcastListItems();


            List<ZcdmTFinalitemWithBLOBs> finalitemlist = new ArrayList<ZcdmTFinalitemWithBLOBs>();
            List<ZcdmTDev> zcdmTDevList = new  ArrayList<ZcdmTDev>();
            List<ZcdmTFinalseg> finalSegList = new ArrayList<ZcdmTFinalseg>();
            List<ZcdmTInnerad> zcdmTInneradList = new ArrayList<ZcdmTInnerad>();
            List<ZcdmTAdSch> zcdmTAdSchList = new ArrayList<ZcdmTAdSch>();

            if(broadcastListItems!=null) {
            	List<BroadcastListItemType> list = broadcastListItems.getBroadcastListItem();
            	if(list!=null&&!list.isEmpty()) {

            		for(int i=0;i<list.size();i++) {
            			BroadcastListItemType item = list.get(i);
            			String broadcastListItemID = finalBCListService.covertStr(item.getBroadcastListItemID());
                        String columnPlayPlanID = finalBCListService.covertStr(item.getColumnPlayPlanID());
                        String planMatchFlag = finalBCListService.covertStr(item.getPlanMatchFlag());
                        BigInteger itemIndex = item.getItemIndex();
                        String event = finalBCListService.covertStr(item.getEvent());
                        String playTime = finalBCListService.covertStr(item.getPlayTime());
                        String duration = finalBCListService.covertStr(item.getDuration());
                        String progDuration = finalBCListService.covertStr(item.getProgDuration());
                        String columnCode = finalBCListService.covertStr(item.getColumnCode());
                        String columnName = finalBCListService.covertStr(item.getColumnName());
                        String programCode = finalBCListService.covertStr(item.getProgramCode());
                        String programName = finalBCListService.covertStr(item.getProgramName());
                        LanguageType audioLanguage = item.getAudioLanguage();
                        String zAudVer = finalBCListService.covertStr(audioLanguage.getLangCode());
                        String zAudName = finalBCListService.covertStr(audioLanguage.getLangName());
                        LanguageType subtitleLanguage = item.getSubtitleLanguage();
                        String zCapVer = finalBCListService.covertStr(subtitleLanguage.getLangCode());
                        String zCapName = finalBCListService.covertStr(subtitleLanguage.getLangName());
                        String video = finalBCListService.covertStr(item.getVideo());
                        String afd = finalBCListService.covertStr(item.getAFD());
                        String audio = finalBCListService.covertStr(item.getAudio());
                        String mediaType = finalBCListService.covertStr(item.getMediaType());
                        String isLive = finalBCListService.covertStr(item.getIsLive());
                        String throughType = finalBCListService.covertStr(item.getThroughType());


                        String newsFlag ="";
                        if(item.isNewsFlag()) {
                        	newsFlag = "X";
                        }else {
                        	newsFlag = "";
                        }
                        String isAD = finalBCListService.covertStr(item.getIsAD());

                        String isChannelBranding ="";
                        if(item.isIsChannelBranding()) {
                        	isChannelBranding ="X";
                        }else {
                        	isChannelBranding ="";
                        }
                        String studioID = finalBCListService.covertStr(item.getStudioID());
                        String studioName = finalBCListService.covertStr(item.getStudioName());
                        String playItemReadyStatus = finalBCListService.covertStr(item.getPlayItemReadyStatus());
                        String progSegmentSum = finalBCListService.covertStr(item.getProgSegmentSum());
                        ProgSectionsType progSections = item.getProgSections();
                        BigInteger limitADSegmentSum = item.getLimitADSegmentSum();
                        String adSegmentID = finalBCListService.covertStr(item.getADSegmentID());
                        SubADItemsType subADItems = item.getSubADItems();
                        String ip = finalBCListService.covertStr(item.getIP());
                        String breakPointID = finalBCListService.covertStr(item.getBreakPointID());
                        String insertTime = "";
                        if(item.getInsertTime()!=null) {
                        	insertTime = finalBCListService.covertStr(item.getInsertTime());
                        }
                        Long markIn = item.getMarkIn();
                        String mediaID = finalBCListService.covertStr(item.getMediaID());
                        String mediaFileName = finalBCListService.covertStr(item.getMediaFileName());
                        String mediaSegIndex = finalBCListService.covertStr(item.getMediaSegIndex());
                        Long mediaTrimIn = item.getMediaTrimIn();
//                        ProgramKeyType programKeys = item.getProgramKeys());
                        String transTape = finalBCListService.covertStr(item.getTransTape());
                        String supervision = finalBCListService.covertStr(item.getSupervision());
                        String comment = finalBCListService.covertStr(item.getComment());
                        PlayDevInfoType playDevInfo = item.getPlayDevInfo();
                        String parentPlayListItemID = finalBCListService.covertStr(item.getParentPlayListItemID());
                        String breakFlag = finalBCListService.covertStr(item.getBreakFlag());
//                        String channelPackingItemCode = item.getChannelPackingItemCode());
                        String adDuration = finalBCListService.covertStr(item.getADDuration());
//                        ExtendAttributeType extendAttributes = item.getExtendAttributes());
                        if("0".equals(ip)){


	                        ZcdmTFinalitemWithBLOBs zcdmTFinalitem = new ZcdmTFinalitemWithBLOBs();
	                        zcdmTFinalitem.setzProItemCd(broadcastListItemID);
	                        zcdmTFinalitem.setzProRecCd(broadcastListID);  //主表ID
	                        zcdmTFinalitem.setzSubjPlanId(columnPlayPlanID);
	                        zcdmTFinalitem.setzPlanMatch(planMatchFlag);
	                        zcdmTFinalitem.setzOrder(Integer.parseInt(String.valueOf(itemIndex)));
	                        zcdmTFinalitem.setzEvent(event);
	                        zcdmTFinalitem.setzPlayTime(playTime);
	                        zcdmTFinalitem.setzSubjTime(duration);
	//                        zcdmTFinalitem.setzSubjLength(zSubjLength);
	                        zcdmTFinalitem.setzProRtmlen(progDuration);
	//                        zcdmTFinalitem.setzProLength(zProLength);
	                        zcdmTFinalitem.setzSubjCd(columnCode);
	                        zcdmTFinalitem.setzSubjName(columnName);
	                        zcdmTFinalitem.setzProcode(programCode);
	                        zcdmTFinalitem.setzPgnam(programName);
	                        zcdmTFinalitem.setzAudVer(zAudVer);
	                        zcdmTFinalitem.setzAudName(zAudName);
	                        zcdmTFinalitem.setzCapVer(zCapVer);
	                        zcdmTFinalitem.setzCapName(zCapName);
	                        zcdmTFinalitem.setzHdFlag(video);
	                        zcdmTFinalitem.setzAfd(afd);
	                        zcdmTFinalitem.setzAudioType(audio);
	                        zcdmTFinalitem.setzCarrierType(mediaType);
	                        zcdmTFinalitem.setzPlayForm(isLive);
	                        zcdmTFinalitem.setzInForm(throughType);
	                        zcdmTFinalitem.setzIsNewsFlag(newsFlag);
	                        zcdmTFinalitem.setzIsAd(isAD);
	                        zcdmTFinalitem.setzChanlCasing(isChannelBranding);
	                        zcdmTFinalitem.setzPlayroom(studioID);
	                        zcdmTFinalitem.setzPlayroomNm(studioName);
	                        zcdmTFinalitem.setzProItemSta(playItemReadyStatus);
	                        zcdmTFinalitem.setzProgSegsum(Short.valueOf(progSegmentSum));
	                        zcdmTFinalitem.setzLimitAd(Short.valueOf(String.valueOf(limitADSegmentSum)));
	                        zcdmTFinalitem.setzInsertWay(ip);
	                        zcdmTFinalitem.setzBreakpointId(breakPointID);

	                        zcdmTFinalitem.setzBefLength(insertTime);
	                        zcdmTFinalitem.setzMarkin(String.valueOf(markIn));
	                        zcdmTFinalitem.setzMediaId(mediaID);
	                        zcdmTFinalitem.setzAdSegmentId(adSegmentID);
	                        zcdmTFinalitem.setzMediaName(mediaFileName);
	                        zcdmTFinalitem.setzMediaSeg(finalBCListService.covertInt(mediaSegIndex));
	                        zcdmTFinalitem.setzMediaTrIn(String.valueOf(mediaTrimIn));
	                        zcdmTFinalitem.setzTransTape(transTape);
	                        zcdmTFinalitem.setzSuperVision(supervision);
	                        zcdmTFinalitem.setzProInsert(comment);
	                        zcdmTFinalitem.setzParentItemCd(parentPlayListItemID);
	//                        zcdmTFinalitem.setzTopicCd(zTopicCd);
	//                        zcdmTFinalitem.setzSpeCd(zSpeCd);
	//                        zcdmTFinalitem.setzMakeSubjCd(zMakeSubjCd);
	//                        zcdmTFinalitem.setzMakeSubjNm(zMakeSubjNm);
	//                        zcdmTFinalitem.setzRepFlag(zRepFlag);
	//                        zcdmTFinalitem.setzDeptCd(zDeptCd);
	//                        zcdmTFinalitem.setzCenterCd(zCenterCd);
	//                        zcdmTFinalitem.setzProdType(zProdType);
	//                        zcdmTFinalitem.setzPgtyp(zPgtyp);
	//                        zcdmTFinalitem.setzPgRootTyp(zPgRootTyp);
	//                        zcdmTFinalitem.setzEpsdSum(zEpsdSum);
	//                        zcdmTFinalitem.setzEpsdSeqnum(zEpsdSeqnum);
	//                        zcdmTFinalitem.setzProAtrbt(zProAtrbt);
	//                        zcdmTFinalitem.setzAttribute(zAttribute);
	                        zcdmTFinalitem.setzBreakFlg(breakFlag);
	                        zcdmTFinalitem.setzAdTime(adDuration);
	                        zcdmTFinalitem.setzChanlCd(channelCode);
	                        zcdmTFinalitem.setzChanlName(channelName);
	//                        zcdmTFinalitem.setzChanlRegion(zChanlRegion);
	                        zcdmTFinalitem.setzPlayDate(zPlayDate);
	//                        zcdmTFinalitem.setzTeleplayBucd(zTeleplayBucd);
	//                        zcdmTFinalitem.setzTeleplayBunm(zTeleplayBunm);
	//                        zcdmTFinalitem.setzPlayCnt(zPlayCnt);
	//                        zcdmTFinalitem.setzCrdat(zCrdat);
	                        finalitemlist.add(zcdmTFinalitem);


                        }else if(!"0".equals(ip)) {

	//                      中插广告begin
	                        ZcdmTInnerad zcdmTInnerad = new ZcdmTInnerad();
	                        zcdmTInnerad.setzBrdcastInid(broadcastListItemID);
	                        zcdmTInnerad.setzItemindex(Integer.valueOf(String.valueOf(itemIndex)));
	                        zcdmTInnerad.setzAdSegLength(duration);
	                        zcdmTInnerad.setzEvent(event);
	                        zcdmTInnerad.setzPlayTime(playTime);
	                        zcdmTInnerad.setzProRtmlen(progDuration);
	                        zcdmTInnerad.setzAdSubjCd(columnCode);
	                        zcdmTInnerad.setzAdSubjNm(columnName);
	                        zcdmTInnerad.setzProcode(programCode);
	                        zcdmTInnerad.setzPgnam(programName);
	                        zcdmTInnerad.setzAudVer(zAudVer);
	                        zcdmTInnerad.setzAudName(zAudName);
	                        zcdmTInnerad.setzCapVer(zCapVer);
	                        zcdmTInnerad.setzCapName(zCapName);
	                        zcdmTInnerad.setzHdFlag(video);
	                        zcdmTInnerad.setzAfd(afd);
	                        zcdmTInnerad.setzAudioType(audio);
	                        zcdmTInnerad.setzCarrierType(mediaType);
	                        zcdmTInnerad.setzPlayForm(isLive);
	                        zcdmTInnerad.setzInForm(throughType);
	                        zcdmTInnerad.setzProItemCd(parentPlayListItemID);
	                        zcdmTInnerad.setzInsertWay(ip);
	                        zcdmTInnerad.setzAdSegmentId(adSegmentID);

	                        zcdmTInneradList.add(zcdmTInnerad);

	//                      中插广告end

	//                      播后单中插广告素材begin
	                        if(subADItems!=null) {
	                        	List<AdProgBcastSchType> subADList = subADItems.getSubADItem();
	                        	AdProgBcastSchType  subAD = new AdProgBcastSchType();

	                        	if(subADList!=null&&!subADList.isEmpty()) {
	                        		ZcdmTAdSch zcdmTAdSch = new ZcdmTAdSch();

	                        		for(int k=0;k<subADList.size();k++) {
	                        			subAD = subADList.get(k);

	                        			zcdmTAdSch = new ZcdmTAdSch();
	                        			zcdmTAdSch.setzProItemCd(broadcastListItemID);
	                        			zcdmTAdSch.setzAdProgNo(String.valueOf(subAD.getAdPlaySequence()));
	                        			zcdmTAdSch.setzAdAssetId(subAD.getAssetID());
	                        			zcdmTAdSch.setzAdMaterialid(subAD.getMaterialID());
	                        			zcdmTAdSch.setzAdMeterialNm(subAD.getMaterialName());
	                        			zcdmTAdSch.setzAdMatLength(subAD.getPlayDuration());
	                        			zcdmTAdSch.setzAdBegTime(subAD.getPlayTimeStart());
	                        			zcdmTAdSch.setzAdSubjCd(subAD.getADProgramCode());
	                        			zcdmTAdSch.setzAdSubjNm(subAD.getADProgramName());
	                        			zcdmTAdSch.setzSubjCd(subAD.getColumnCode());
	                        			zcdmTAdSch.setzSubjName(subAD.getColumnName());
	                        			zcdmTAdSch.setzAfd(subAD.getAFD());
	                        			zcdmTAdSch.setzHdFlag(subAD.getVideo());
	                        			zcdmTAdSch.setzAudioType(subAD.getAudio());
	                        			zcdmTAdSch.setzAudVer(subAD.getAudioLanguage().getLangCode());
	                        			zcdmTAdSch.setzAudName(subAD.getAudioLanguage().getLangName());
	                        			zcdmTAdSch.setzCapVer(subAD.getSubtitleLanguage().getLangCode());
	                        			zcdmTAdSch.setzCapName(subAD.getSubtitleLanguage().getLangName());
	                        			zcdmTAdSch.setzAdItemtype(subAD.getItemType());


	                        			zcdmTAdSchList.add(zcdmTAdSch);
	                        		}
	                        	}
	                        }

                        }
//                      播后单中插广告素材end



//                        填写播出条目分段信息 begin
                        ZcdmTFinalseg zcdmTFinalseg = new ZcdmTFinalseg();


                        if(progSections!=null) {

                        	List<ProgSectionType> progsectionList =  progSections.getProgSection();
                        	ProgSectionType progSectionType = new ProgSectionType();

                        	if(progsectionList!=null&&!progsectionList.isEmpty()) {

                        		for(int k=0;k<progsectionList.size();k++){
                        			progSectionType = new ProgSectionType();
                        			progSectionType = progsectionList.get(k);

                        			zcdmTFinalseg = new ZcdmTFinalseg();
                        			zcdmTFinalseg.setzSegItemCd(progSectionType.getBroadcastListItemID());
                        			zcdmTFinalseg.setzSegmentNo(progSectionType.getProgSectionID());
                        			zcdmTFinalseg.setzSegmentNm(progSectionType.getProgSectionName());
                        			zcdmTFinalseg.setzFatherItemCd(progSectionType.getParentPlayListItemID());
                        			zcdmTFinalseg.setzPlayTime(progSectionType.getProgSectionPlayTime());
                        			zcdmTFinalseg.setzSegLength(progSectionType.getProgSectionLength());
                        			zcdmTFinalseg.setzSegStatus(progSectionType.getProgSectionStatus());

                        			finalSegList.add(zcdmTFinalseg);
                        		}
                        	}
                        }
//                      填写播出条目分段信息 end


//                      视频设备begin
                        ZcdmTDev zcdmTDev = new ZcdmTDev();
                        if(playDevInfo!=null) {
                        	zcdmTDev.setzProItemCd(broadcastListItemID);
                        	zcdmTDev.setzDevTypeCode(Integer.valueOf(String.valueOf(playDevInfo.getBakDevType().getDevTypeCode())));
                        	zcdmTDev.setzDevTypeName(playDevInfo.getDevName());
                        	zcdmTDev.setzPlaydevId(playDevInfo.getDevID());
                        	zcdmTDev.setzPlaydevName(playDevInfo.getDevName());
                        	zcdmTDev.setzPlayauddevId(playDevInfo.getAudioDevID());
                        	zcdmTDev.setzBakdevId(playDevInfo.getBakDevID());
                        	zcdmTDev.setzBakdevName(playDevInfo.getBakDevName());

                        	zcdmTDevList.add(zcdmTDev);
                        }


//                      视频设备end

            		}
            	}
            }

            int ll_count = finalBCListService.saveFinalList(zcdmTFinallist, finalitemlist,zcdmTInneradList,zcdmTAdSchList,finalSegList,zcdmTDevList);

            String code = "";

            SubscriberType subscriberType = new SubscriberType();
            if(ll_count>0){
    			code = "000";
    			subscriberType.setNameCN("成功");
    		}else {
    			code = "050";
    			subscriberType.setNameCN("失败");

    		}




            GregorianCalendar cal = new GregorianCalendar();
            cal.setTime(new Date());
            XMLGregorianCalendar jobFinishDate = null;
            jobFinishDate = DatatypeFactory.newInstance().newXMLGregorianCalendar(cal);

            String jobFinishedTime = finalBCListService.getPlayDate(new Date(), new SimpleDateFormat("HH:mm:ss"));

            _return.setBroadcastListID(broadcastListID);
            _return.setJobFinishDate(jobFinishDate);
            _return.setJobFinishedTime(jobFinishedTime);
            _return.setStatusCode(code);
            _return.setSubscriber(subscriberType);
            return _return;
        } catch (java.lang.Exception ex) {
        	Log.debug("cmdfinalbroadcastlist=====", ex);
            ex.printStackTrace();
            throw new RuntimeException(ex);
        }
        //throw new ESBFault("ESBFault...");
    }

}
